program aad(input,output);
var a,b,c:integer;
begin
a:=5;
b:=6;
c:=7;
a:=((a*b+c)*(a*b+c))+(a*b+c)*(a*b+c);
write(a)
end.
